<?php

/**
 * Trida entity pro logovani uaktivity uzivatele.
 *
 * @author David Dusek
 */
namespace CMS\User\Models;

use Doctrine\ORM\Mapping as ORM;

/** 
 * @ORM\Entity(repositoryClass="\CMS\User\Models\UserLogRepository")
 * @ORM\Table(name="user_log")
 */
class UserLog extends \Nette\Object {    
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue
     * @var int 
     */
    private $id;
    
    /**
     * @ORM\Column(name="date_time", type="datetime")
     * @var string 
     */
    private $timestamp;
    
    /**
     * @ORM\manyToOne(targetEntity="\CMS\User\Models\User", inversedBy="logRecords")
     * @ORM\joinColumn(name="user", referencedColumnName="id")
     */
    private $user;
    
    /**
     * @ORM\Column(length=100)
     * @var string 
     */    
    private $title;
    
    /**
     * @ORM\Column(type="text")
     * @var string 
     */
    private $description;
    
    /**
     * @ORM\Column(length=255)
     * @var string
     */
    private $link;
    
    /**
     * @ORM\Column(length=100)
     * @var string 
     */
    private $entity;
    
    /**
     * @ORM\Column(name="entity_id", type="integer")
     * @var int
     */
    private $entityId;
    
    public function getId() {
        return $this->id;
    }
    
    public function setTimestamp($timestamp) {
        $this->timestamp = $timestamp; 
    }

    public function getTimestamp() {
        return $this->timestamp;
    }

    public function setUser($user) {
        $this->user = $user; 
    }

    public function getUser() {
        return $this->user;
    }

    public function setTitle($title) {
        $this->title = $title; 
    }

    public function getTitle() {
        return $this->title;
    }

    public function setDescription($description) {
        $this->description = $description; 
    }

    public function getDescription() {
        return $this->description;
    }
    
    public function setLink($link) {
        $this->link = $link; 
    }

    public function getLink() {
        return $this->link;
    }

    public function setEntity($entity) {
        $this->entity = $entity; 
    }

    public function getEntity() {
        return $this->entity;
    }

    public function setEntityId($entityId) {
        $this->entityId = $entityId; 
    }

    public function getEntityId() {
        return $this->entityId;
    }
}
